Program Listing for File map_element.h

Return to documentation for file (codes/cubicle_merge/map_element.h)

/*******************************************************
 * Copyright (C) 2019, Robotics Group, Nanyang Technology University
 *
 * \file map_element.h
 * \author Zhang Handuo (hzhang032@e.ntu.edu.sg)
 * \date Januarary 2017
 * \brief Definition of an “object" of the object map.
 *
 * Licensed under the GNU General Public License v3.0;
 * you may not use this file except in compliance with the License.
 *
 *******************************************************/
#ifndef PROJECT_MAP_ELEMENT_H
#define PROJECT_MAP_ELEMENT_H

#include <vector>
#include <Eigen/Dense>
#include "util.h"
#include <deque>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

typedef unsigned long int index_t;

class MapElement
{
public:
    MapElement();

    MapElement(index_t ID_, double timestamp, Vector3d& w_point_, Vector3d& lo_point_, float height_, float width_,
               float prob_, std::string& catogory_, std::vector<float>& histogram_);


    void use_prediction(Eigen::Vector3d& prev_pos);

    void use_prediction_increment(Eigen::Vector3d& prev_pos, Eigen::Vector2d& incre);

    void update_map_element(MapElement*);

    void setold_position();

//    void update_category(std::string&);


    void set_merge();

    void set_age(int );

    void set_vel(Eigen::Vector3d&, double);
//    void set_velocity(double);

    index_t id;

    Eigen::Vector3d center_point_world;

    Eigen::Vector3d old_center_world;

    Eigen::Vector3d center_point_local;

    Eigen::Vector3d velocity;

    Eigen::Vector2d plane_velocity;

    std::deque<Eigen::Vector2d> traj_diff;

    std::deque<double> time_diff;

    bool todelete;

    double temp_diff, cur_timestamp;

    int age;

    int lost_frame;

    float height;

    float width;

    float probability;

    std::string category;

    std::vector< float > histograms;

    bool isMerged;

    bool isTracked;
    bool same_point;
};

#endif //PROJECT_MAP_ELEMENT_H